![]() |
AllowPurgePixels |
||||
Header: | QDOffscreen.h | Carbon status: | Supported | |
Makes the base address for an offscreen pixel image purgeable.
void AllowPurgePixels ( PixMapHandle pm );
A handle to an offscreen pixel map.
The AllowPurgePixels function allows the Memory Manager to free the memory it occupies if available memory space becomes low. By default, NewGWorld creates an unpurgeable base address for an offscreen pixel image.
To get a handle to an offscreen pixel map, first use the GetGWorldPixMap function. Then supply this handle for the pm parameter of AllowPurgePixels.
Your application should call the LockPixels function before drawing into or copying from an offscreen pixel map. If the Memory Manager has purged the base address for its pixel image, LockPixels returns FALSE. In that case either your application should use the UpdateGWorld function to begin reconstructing the offscreen pixel image, or it should draw directly to an onscreen graphics port.
Only unlocked memory blocks can be made purgeable. If you use LockPixels, you must use the UnlockPixels function before calling AllowPurgePixels.
The AllowPurgePixels function may move or purge memory blocks in the application heap; do not call this function at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)